import defaultSettings from '@/settings'
import { defineStore } from 'pinia'

export const useSettingsStore = defineStore('settings', {
    state: () => ({
        theme: {},
        ...defaultSettings // 直接展开defaultSettings 作为初始状态
    }),
    actions: {
        changeSetting(key, value) {
            if (this.hasOwnProperty(key)) {
                this[key] = value
            }
        }
    }
})
